home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr37
/
ducal114.zip
/
DUCALL1.WCC
< prev
next >
Wrap
Text File
|
1995-03-02
|
38KB
|
1,206 lines
'DuCall version 1.14ß........................by David L. Kuhn and
' Dimensions Unlimited
'
' copyright(c) 1995
'
' Callback verifier for Wildcat 4.01
'
'
'Revision history:
'
' Version 1.00α, 29 Jan 95: Made the original version. Initial testing
' look good!
' Version 1.02α, 30 Jan 95: Cleaned up, Added a much more detailed Sysop
' messaging system.
' Version 1.03α, 30 Jan 95: Fixed a bug of finding the current user's phone
' number in the user database under his own user
' record!!! Ooops!
' Version 1.04α, 30 Jan 95: Tweaked multi-verification system
' Version 1.05α, 30 Jan 95: Added support for Sysop to specify the name of
' Main Menu as named in the description field
' for the main menu in MakeMenu.
' Version 1.06α, 30 Jan 95: Added file locking logic. Adding multiple call
' try coding.
' Version 1.07α, 18 Feb 95: Added LD Time Checking
' Version 1.10ß, 18 Feb 95: Bug fix for LD Time Checking
' Added Bad Verification Message to Sysop function
' Added program pathname support
' Version 1.11ß, 18 Feb 95: Added a few more bad sysop message triggers
' Version 1.12ß, 18 Feb 95: Removed the extra version # in middle of some
' screens. Corrected CarrierOn Detection while
' writtin auditrail & badsysopmsg during the dial
' attempt process.
' Version 1.13ß, 1 Mar 95: added expiration date option
' added feature to treat all calls as long
' distance.
' fixed an oversite where the welcome message to
' both the user and the sysop was not being sent
' if the user was long distance
' added date format to configuration
' cleaned two more screens
' added support for sysops without a local prefix
' control file (see config file for details)
' Version 1.14ß, 2 Mar 95: Fixed the LD Time Allowed routine. It was too
' complicated and didn't work. This time I just
' do a brute forse time allowed test and test for
' all combinations of start & stop times.
'
'About the program:
'
'This program was built from a basic idea that was posted on MSI
'by John Livingston and from the callback example in the WcCode manual.
'It includes a simple interface, proper checking of phone prefixes, proper
'checking of 911, 411, 800, 900 & 555 phone numbers, configurable security
' level masks, welcome mail and an audit trail.
'
'It requires three external files. One called 'duclocl.cfg' which has the
'numbers of the valid (toll free) exchanges in your area. One called
'DUCWEL.MSG which contains your general message to successful upgraders.
'And finally, one called ducall.cfg which has the general configuration for
'the program and security level that the successful call back awards to the
'newuser. This file MUST be edited for each BBS systyem! All files are
'mandatory!
'
'This program writes to a file called ducall.log and to the user database.
'
' HELLO!
'
'You must have a welcome message for your newly upgraded user in the
'file called DUCWEL.MSG. When the user gets upgraded, this file is
'sent as a private message to him/her.
'
' HELLO!
'
'This program is not guaranteed to do anything except take up
'space on your hard drive. In addition, since it adjusts your database, I
'cannot be responsible for any damage or errors caused when using this
'program. User beware!
'
CarrierCheck On
'
dim dfmat as string
dim all_ld as integer
dim dialing as integer
dim problem as string
dim CTimeNow as Time
dim ldstart as time
dim ldstarttemp as string
dim ldstoptemp as string
dim ldstop as time
dim ldvfyok as integer
dim mainmenu as string
dim sysopsec as string
dim sysopname as string
dim ducallver as string
dim justentered as integer
dim doit as string*1
dim phone as string*8
dim test_phone as string*3
dim dummy as string
dim name1 as string*25
dim x as integer
dim answer as string*1
dim msgconf as integer
dim phonenum as string*15
dim bbsname as string
Function ChkLDTime
'
if all_ld=1 then LdVfyOk=True: Exit Function
If FormatTime(LDStop, "hh:mm") = FormatTime(LDStart, "hh:mm") then LdVfyOk=True: Exit Function
'
' Assume false unles proven otherwise
'
LDVFYOK = False
'
If FormatTime(CTimeNow, "hh:mm") >= FormatTime(LDStart, "hh:mm") then
If FormatTime(CTimeNow, "hh:mm") <= FormatTime(LDStop, "hh:mm") then
'
' Current Time is greater than the start time and the
' Current Time is is less than the stop time. Simple time calc.
'
LDVFYOK = True
end if
'
If FormatTime(LDStop, "hh:mm") < FormatTime(LDStart, "hh:mm") then
'
' Current time is after start time, but stop time is before start time
' Stop Time midnight rollover
'
LDVFYOK = True
end if
'
elseif FormatTime(CTimeNow, "hh:mm") < FormatTime(LDStart, "hh:mm") then
'
' Current Time is less than the start time
'
if FormatTime(CTimeNow, "hh:mm")<=FormatTime(LDStop,"hh:mm") then
IF FormatTime(LDStart, "hh:mm")>FormatTime(LDStop,"hh:mm") then
'
' if current time is less than both the stop and start times, the
' start time must have been before midnight and the stop time some
' time before the start time! Roll-Over!
'
LDVFYOK = True
end if
end if
End If
'
End Function
sub typeit(betyped as string,scrcol as integer,scrfg as integer,scrbg as integer)
' this sub make a character string look like it's being typed on the
' screen before the users eyes. Cute.
' Requires ansidectected!
dim a as integer
dim y as integer
a=csrlin
if scrcol=0 then
scrcol=(80-len(betyped))/2
end if
print chr(13);"@"+right(hex(scrbg),1)+right(hex(scrfg),1)+"@";chr(13);
for y=1 to len(betyped)
locate a,y+scrcol
print mid(betyped,y,1);
if y<>len(betyped) then delay .01
next y
print
end sub
sub shiftit(beshifted as string,scrcol as integer,scrfg as integer,scrbg as integer)
' This sub brings a character string in from the right of the screen and
' scrolls those characters to a specified screen column. If the specified
' screen column is zero, the character string gets centered on the screen.
' Requires ansidectected!
dim a as integer
dim c as integer
dim y as integer
if scrcol=0 then
scrcol=(80-len(beshifted))/2
end if
print chr(13);"@"+right(hex(scrbg),1)+right(hex(scrfg),1)+"@";chr(13);
a=csrlin
c=1
for y=79 to scrcol step-1
locate a,y
print left(beshifted,c);
clreol
c=c+1
if c>len(beshifted) then c=len(beshifted)
delay .01
next y
print
end sub
sub center(tobecentered as string,scrfg as integer,scrbg as integer)
'This routine simply centers a character screen in the center of the
'current line. Does not require ansidetected!
dim a as integer
dim b as integer
dim scrcol as integer
dim dummy2 as string
dim y as integer
a=0
dummy2=tobecentered
print chr(13);"@"+right(hex(scrbg),1)+right(hex(scrfg),1)+"@";chr(13);
scrcol=80-len(ltrim(dummy2))
for y=1 to len(tobecentered)
if mid(tobecentered,Y,1)="@" then a=a+1
next y
b=int(a/2)
scrcol=(scrcol/2)+b
print chr(13);string(scrcol," ");ltrim(dummy2);
print
end sub
Sub audittrail
'This sub opens an audit trail and appends whatever is in string
'DUMMY to the log file DUCALL.LOG. The first time it is called,
'the user's name is recorded. Each time it called, the time and date
'are recorded. This function is useful for debug, for tracking pests
'and for just being able to see what the door is doing for you.
'It doesn't log Sysop activity.
'Since WcCode app selection is not recorded in the Activity log, this
'replaces that void.
if user.Seclevel = rtrim(sysopsec) then exit sub
Const DateMask = "mm/dd/yyyy"
Const TimeMask = "hh:mm:ss"
Dim today as date
dim timenow as time
dim ff as integer
currentdate(today)
currenttime(timenow)
ff=freefile
open ProgPath+"ducall.log" for append as #ff
carrierCheck Off
lockfile(ff,0,1)
if dummy<>string(79,"─") then
if justentered=1 then
print #ff,dummy;" at "formattime(timenow,timemask)" on "formatdate(today,dfmat)
else
print #ff,user.name ;dummy;" at "formattime(timenow,timemask)" on "formatdate(today,dfmat)
end if
else
print #ff,string(79,"─")
end if
unlockfile(ff,0,1)
IF Dialing=0 then carriercheck on
close #ff
end sub
sub waitkp
' Stolen from an example in the WcCode Conference on MSI
dim pcolor as integer
print
pcolor = 9
do
print chr(13);"@"+right(hex(pcolor),2)+"@";"Press ENTER to continue...";
pcolor = pcolor + 1
if pcolor > 15 then
pcolor = 9
end if
delay 0.5
loop until inkey = chr(13)
end sub
sub SendSysopBadMsg
' Prefix was not found
dim msg as MessageHeader
dim ff as integer
if exists(ProgPath+"DUCSBAD.MSG") then kill ProgPath+"DUCSBAD.MSG"
ff=freefile
open ProgPath+"DUCSBAD.MSG" for output as #ff
CarrierCheck off
lockfile(ff,0,1)
print #ff,"@03@NEW USER:@0F@ "+user.name
print #ff,"@03@BAD DATA NUMBER:@0F@ "+phonenum+"@0E@"
print #ff,"@03@PROBLEM:@0F@ "+Problem+"@0E@"
print #ff, ""
print #ff, "The above listed user was not verified, by DuCall, on the Date"
print #ff, "shown in the upper right hand corner. Please check your DUCCLOCL.CFG"
print #ff, "control file to see if the caller's prefix is in your database of"
print #ff, "local phone numbers."
print #ff, ""
print #ff, "@0F@═ @02@DuCall is a Copyright(c) of Dimensions Unlimited, 1995@0F@ ═"
unlockfile(ff,0,1)
IF Dialing=0 then carriercheck on
Close #ff
msg.From="DuCall "+DuCallVer
msg.To=SysopName
msg.Subject="New User Verified"
msg.flags=msg.flags OR 1
AddMessage(msg,ProgPath+"DUCSBAD.MSG",,msgconf)
if exists(ProgPath+"DUCSBAD.MSG") then kill ProgPath+"DUCSBAD.MSG"
end sub
sub SendWelcomeMessage
'First, we send a welcome to the user, then we notify the sysop
dim msg as MessageHeader
dim ff as integer
msg.From=SysopName
msg.To=user.name
msg.Subject="Welcome!"
msg.flags=msg.flags OR 1
AddMessage(msg,ProgPath+"ducwel.msg",,msgconf)
if exists(ProgPath+"DUCSYSOP.MSG") then kill ProgPath+"DUCSYSOP.MSG"
ff=freefile
open ProgPath+"DUCSYSOP.MSG" for output as #ff
CarrierCheck off
lockfile(ff,0,1)
print #ff,"@03@NEW USER:@0F@ "+user.name
print #ff,"@03@VERIFIED DATA NUMBER:@0F@ "+phonenum+"@0E@"
print #ff, ""
print #ff, "The above listed user has been verified by DuCall, on the Date"
print #ff, "shown in the upper right hand corner. The Data Number has been"
print #ff, "added to the User's Record under the DATANUMBER category..."
print #ff, ""
print #ff, "A message has been sent to @0F@"+user.name+"@0E@"
print #ff, "thanking him/her for calling."
print #ff, ""
print #ff, "@0F@═ @02@DuCall is a Copyright(c) of Dimensions Unlimited, 1995@0F@ ═"
unlockfile(ff,0,1)
carriercheck on
Close #ff
msg.From="DuCall "+DuCallVer
msg.To=SysopName
msg.Subject="New User Verified"
msg.flags=msg.flags OR 1
AddMessage(msg,ProgPath+"DUCSYSOP.MSG",,msgconf)
if exists(ProgPath+"DUCSYSOP.MSG") then kill ProgPath+"DUCSYSOP.MSG"
end sub
' ********************************
' *** MAIN PROGRAM STARTS HERE ***
' ********************************
dim timenow as time
dim uselocal as integer
dim expiredate as date
dim expiredays as integer
dim z as integer
dim y as integer
dim ff as integer
dim pcolor as integer
dim ld as integer
dim dialld as integer
dim temp as string
dim presec as string
dim aftersec as string
dim cscrln as integer
dim areacode as string
dim prefix as string
dim extension as string
dim userrec as userrecord
dim dupenumber as integer
dim prefixmatch as integer
dim password1 as string*14
dim commentline as integer
dim timebalance as integer
dim duplicatenumbers as integer
dim thisrecord
dim tries as integer
Dim StartTime as Real
ducallver="1.14ß"
CurrentTime(CTimeNow)
dummy=" entered callback verifier "
audittrail
justentered=1
if not exists(ProgPath+"DUCWEL.MSG") then
print
print "!!! SYSOP ERROR !!! Welcome Message test not found!",12,0
print
waitkp
dummy=" "+ProgPath+"DUCWEL.MSG not found, aborting "
audittrail
goto DucEnd
end if
if not exists(ProgPath+"DUCALL.CFG") then
print
center "!!! SYSOP ERROR !!! Configuration File not found!", 12,0
print
waitkp
dummy=" configuration file error!!! "
audittrail
goto DucEnd
else
ff=freefile
open ProgPath+"DUCALL.CFG" for input as FF
carriercheck off
lockfile(ff,0,1)
input #ff, bbsname
input #ff, sysopname
input #ff, temp
ld=val(temp)
if ld=1 then
dummy=" long distance allowed "
audittrail
end if
input #ff, presec
input #ff, aftersec
input #ff, sysopsec
input #ff, temp
msgconf=val(temp)
input #ff, temp
commentline=val(temp)
input #ff, temp
timebalance=val(temp)
input #ff, temp
duplicatenumbers=val(temp)
input #ff, mainmenu
input #ff, temp
tries=val(temp)
Input #ff, temp
LDStarttemp=rtrim(temp)
Input #ff, temp
LDStoptemp=rtrim(temp)
input #ff, temp
ExpireDays=Val(Temp)
input #ff, temp
all_ld = Val(Temp)
input #ff, temp
dfmat = rtrim(ltrim(temp))
input #ff, temp
UseLocal = Val(Temp)
unlockfile(ff,0,1)
carriercheck on
close #ff
TimeStringToTime("hh:mm", LDStartTemp, LdStart)
TimeStringToTime("hh:mm", LDStoptemp, LdStop)
end if
CLS
center "Hello!", 15,0
center bbsname+" presents @0D@DuCall@0E@, a Wildcat! callback verifier", 14,0
if ansidetected then
typeit "by Dimensions Unlimited", 0,3,0
center "&",6,0
shiftit "Your Sysop: "+rtrim(sysopname),0,14,8
else
center "by Dimensions Unlimited", 3,0
center "&",6,0
center "Your Sysop: "+rtrim(sysopname),14,8
end if
if all_ld=0 then
center string(70,"═"),15,0
center "DuCall v"+ducallver,10,0
center string(70,"═"),15,0
else
color 15,0
print string(79, "═")
center "DuCall v"+ducallver,10,0
Color 15,0
print string(79,"═")
end if
if (user.Seclevel <> presec) and (user.Seclevel <> sysopsec) then
pcolor=14
print chr(13);"@"+right(hex(pcolor),2)+"@";
Print
Print "You have already been verified! There is no need to access this"
Print "Callback verifier again. Thanks!"
Print
dummy=" This user had been previously verified! "
audittrail
waitkp
end
End if
pcolor=11
print chr(13);"@"+right(hex(pcolor),2)+"@";
if all_ld=0 then
if ld=0 then
print
print" Your Sysop has disabled Long Distance Call-Back verification."
print
print" If you are calling from a toll area or long distance, you cannot use"
print" this verifier. You must wait 24 hours for upgrade. Just leave us a"
print" note and we will get you going. If you are calling locally, then"
print" please continue on."
else
print
print" Your Sysop allows Long Distance Call-Back verification!"
print
ChkLdTime
IF ldvfyok=False then
Print" but.... the system only will only do long distance verification"
Print" between ";FormatTime(LDStart,"hh:mmte"); " and "FormatTime(LDStop,"hh:mmte");". If you are calling Long Distance,"
print" please call back during those hours. Thanks!"
print
doit = inputmask(" Are you calling Long Distance? ","Y")
if Doit="Y" then
currenttime(timenow)
gosub topscreen
pcolor=11
print chr(13);"@"+right(hex(pcolor),2)+"@";
print " Please call back during the allowed hours. Once again, those hours"
Print " are between ";FormatTime(LDStart,"hh:mmte"); " and "FormatTime(LDStop,"hh:mmte");"."
print
print " Current Time: ";:Color 12:Print FormatTime(timenow, "hh:mm")
dummy=" attempted L/D verification outside allowed hours"
audittrail
problem="L/D outside allowed hours"
SendSysopBadMsg
waitkp
goto DucEnd
end if
end if
Print" Please continue on to the next step."
end if
end if
if all_ld=0 then
pcolor=13
print chr(13);"@"+right(hex(pcolor),2)+"@";
print
doit = inputmask(" Should I call your computer so I can verify your phone number? ","Y")
if doit="N" then
pcolor=14
print chr(13);"@"+right(hex(pcolor),2)+"@";
print
print"Okay! Aborting. Returning to the BBS."
waitkp
dummy=" refused initial callback question"
audittrail
problem="User refused initial callback question"
SendSysopBadMsg
goto DucEnd
end if
doit=""
gosub topscreen
cscrln=csrlin
end if
pcolor=11
print chr(13);"@"+right(hex(pcolor),2)+"@";
print" The purpose off Call-Back Verification is to protect your rights as a user."
Print" It insures that someone else is not pretending to be you, an logging on"
print" and using your time. It also provides me with a record of phone numbers"
print" I can use to compare against other users in the Data Base, to make sure"
print" your account is not being violated."
print
print" After you have completed the verification, you will be upgraded on the spot"
print" to a status that is set for Non-Subscribers to this system. If you have"
print" any questions at all, please post me, ";rtrim(sysopname);","
print" a message from the main menu."
print
waitkp
cls
gosub topscreen
print" In a moment you will be asked for your Areacode, Prefix and Extension. You"
print" will have a chance to make changes in the event you entered the wrong"
print" information. The proceedures are pretty straight forward, so you should"
print" have no trouble getting through this."
print
waitkp
cls
gosub topscreen
do
cscrln=csrlin
do
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
areacode=inputmask("Enter your AreaCode: ","999")
prefix=inputmask("Enter your Pre-Fix: ","999")
extension=inputmask("Enter your extension: ","9999")
print
dummy=" ["+areacode+"] "+prefix+"-"+extension+" entered"
audittrail
if len(trim(areacode))<>3 or len(trim(prefix))<>3 or len(trim(extension))<>4 then
pcolor=15
print chr(13);"@"+right(hex(pcolor),2)+"@";
print "We can not accept blanks in your data entry."
print
doit=inputmask("Quit? ","Y")
if doit="Y" then
dummy=" user aborting "
audittrail
problem="User Refused to answer Phone # Question"
SendSysopBadMsg
goto DucEnd
end if
else
pcolor=15
print chr(13);"@"+right(hex(pcolor),2)+"@";
dummy="Is @0E@["+areacode+"] "+prefix+"-"+extension+"@0F@ correct? "
doit=inputmask(Dummy,"Y")
if doit="Y" then exit do
end if
cls
gosub topscreen
loop
cls
gosub topscreen
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
print
print "Scanning user database for duplicate phone numbers..."
print "Your number: ";"@0E@["+areacode+"] "+prefix+"-"+extension+"@0F@"
phonenum=areacode+"-"+prefix+"-"+extension
dupenumber=0
if GetUser(UserRec,"") then
DO
thisrecord=0
'
if rtrim(userrec.phonenumber) = phonenum and userrec.name <> user.name then
dupenumber=dupenumber+1
thisrecord=1
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
Print "Duplicate Voice Number found: ";
pcolor=14
print "@"+right(hex(pcolor),2)+"@";
print userrec.phonenumber
dummy=" duplicate voice number found in user database "
audittrail
if dupenumber>(duplicatenumbers+1) then exit do
end if
if rtrim(userrec.datanumber) = phonenum and userrec.name <> user.name then
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
Print "Duplicate Data Number found: ";
pcolor=14
print "@"+right(hex(pcolor),2)+"@";
print userrec.datanumber
if thisrecord<>1 then dupenumber=dupenumber+1:thisrecord=1
dummy=" duplicate data number found in user database "
audittrail
if dupenumber>(duplicatenumbers+1) then exit do
end if
if rtrim(userrec.faxnumber) = phonenum and userrec.name <> user.name then
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
Print "Duplicate Fax Number found: ";
pcolor=14
print "@"+right(hex(pcolor),2)+"@";
print userrec.faxnumber
if thisrecord<>1 then dupenumber=dupenumber+1:thisrecord=1
dummy=" duplicate fax number found in user database "
audittrail
if dupenumber>(duplicatenumbers+1) then exit do
end if
Loop until not GetNextUser(UserRec)
end if
y=0
print
if dupenumber>=1 then
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
print "The phone number you entered is already in the user database!"
print
if duplicatenumbers=0 then
print "Only one user can be verified per phone number."
else
print "The Sysop allows ";duplicatenumbers; " extra user verification(s) at your"
print "phone number. Currently, there is ";str(dupenumber); " users verified at"
print "your location."
print
if dupenumber>duplicatenumbers then
print "Sorry, we can not automatically verify more users for your location."
print
waitkp
else
y=1
end if
end if
if y=0 then
pcolor=15
print chr(13);"@"+right(hex(pcolor),2)+"@";
doit=inputmask("Do you wish to re-enter your phonenumber? ","Y")
if doit="N" then
dummy=" the user is exiting "
audittrail
problem=str(dupenumber)+" user(s) already verified at this phone number"
SendSysopBadMsg
goto DucEnd
end if
else
dummy=" allowing a duplicate number verification "
audittrail
exit do
end if
else
dummy=" number is new to the database "
audittrail
exit do
end if
dummy=" user is re-entering the phone number "
audittrail
cls
gosub topscreen
loop
'
IF DupeNumber=0 then
print
print "Your phone number was not found in the User Data Base. That is good!"
print
end if
waitkp
'
if all_ld=0 or UseLocal=0 then
cls
gosub topscreen
'
print
print "Checking your number against a database of local phone number prefixes...";
ff=freefile:prefixmatch=0
open ProgPath+"DUCCLOCL.CFG" for input as #ff
carriercheck off
lockfile(ff,0,1)
do while not eof(ff)
input #ff, temp
if left(temp,1)<>";" then
if left(UCASE(temp),4)<>"AREA" or left(ucase(temp),4)<>"ENDA" then
if left(phonenum,7)=left(temp,7) then prefixmatch=1: exit do
end if
end if
loop
unlockfile(ff,0,1)
carriercheck on
close #ff
print
if prefixmatch=1 then
print
print "Match! We have a match. The number you have entered is confirmed to be a"
print "local telephone call."
print
waitkp
dummy=" telephone prefix match! It's a local call "
audittrail
phone=right(rtrim(phonenum),8)
else
if ld=0 then
print
print "Sorry, for some reason, your telephone prefix is not in our extensive Data"
print "Base of local phone number prefixes. Please leave the Sysop a message"
print "and tell the sysop your phone number prefix so that he can get the data"
print "base updated. Are you calling long distance? We can not verify long"
print "distance callers."
print
dummy=" the prefix given is not in DucClocl.CFG "
audittrail
Problem="Caller's prefix not in database of local phone number pre-fixes"
SendSysopBadMsg
waitkp
goto DucEnd
else
ChkLdTime
IF ldvfyok=false then
cls
gosub topscreen
print
print "Your phone number must be long distance from this BBS. If not your"
print "telephone prefix was not in our extensive Data Base of local phone"
print "number prefixes."
print
print "Long Distance verification is only allowed between the hours of ";FormatTime(LdStart, "hh:mmte"); " and ";FormatTime(LdStop, "hh:mmte");"."
print "Please try back during those hours. Thanks!"
print
print "If you are local, please send the Sysop a message (comment) and tell the"
print "Sysop your phone number prefix so that he can get the database of local"
print "phone numbers updated."
print
dummy=" attempted L/D verification outside allowed hours"
audittrail
problem="L/D outside allowed hours"
SendSysopBadMsg
waitkp
goto DucEnd
end if
'
print
print "Your phone number must be long distance from this BBS. If not your"
print "telephone prefix was not in our extensive Data Base of local phone"
print "number prefixes. If you are local, please send the Sysop a message"
print "and tell the Sysop your phone number prefix so that he can get the"
print "database of local phone numbers updated."
print
temp=inputmask("Is your Phone Number Long Distance from this BBS? ","Y")
if temp="N" then
print "Please leave the sysop a note with your prefix. Thanks!"
dummy=" the prefix given is not in DucClocl.CFG "
audittrail
Problem="User Reports that their prefix is not in the database of local phone number pre-fixes"
SendSysopBadMsg
waitkp
goto DucEnd
else
dialld=1
print
temp=inputmask("Should your number be dialed: 1-"+phonenum+"? ","Y")
if temp="Y" then
phonenum="1-"+phonenum
else
print
temp=inputmask("Should your number be dialed: 1-"+right(rtrim(phonenum),8)+"? ","Y")
if temp="Y" then
phonenum="1-"+right(rtrim(phonenum),8)
else
print
print "Are you local? This call back verifier is confused!"
print
waitkp
dummy=" confused - long distance? "
audittrail
problem="User and DuCall Confused. L/D ?"
SendSysopBadMsg
goto DucEnd
end if
end if
end if
end if
end if
else
if all_ld=1 then
phonenum="1-"+phonenum
elseif UseLocal=0 then
dummy = " asking user how to dial phone"
AuditTrail
temp=inputmask("Should your number be dialed: "+right(rtrim(phonenum),8)+"? ","Y")
IF Temp="Y" then
phone=right(rtrim(phonenum),8)
else
temp=inputmask("Is your Phone Number Long Distance from this BBS? ","Y")
if temp="N" then
print "It seems to us that you're confused. Please leave a comment for the Sysop."
dummy=" user confused, exiting"
audittrail
Problem="User Confused. He/she can not tell us how to dial the phone"
SendSysopBadMsg
waitkp
goto DucEnd
else
dialld=1
print
temp=inputmask("Should your number be dialed: 1-"+phonenum+"? ","Y")
if temp="Y" then
phonenum="1-"+phonenum
else
print
temp=inputmask("Should your number be dialed: 1-"+right(rtrim(phonenum),8)+"? ","Y")
if temp="Y" then
phonenum="1-"+right(rtrim(phonenum),8)
else
print
print "Are you local? This call back verifier is confused!"
print
waitkp
dummy=" confused - long distance? "
audittrail
problem="User and DuCall Confused. L/D ?"
SendSysopBadMsg
goto DucEnd
end if
end if
end if
end if
end if
end if
'
cls
gosub topscreen
'
gosub checkphone
'
print
print " We will be calling you back shortly at: ";phone
print
print " It can take anywhere from 5-45 seconds after you type ATA, before our"
print " modems re-connect. Please be patient...."
print
print " When you see the word RING, type ATA then press ENTER"
print
print " We will now call you back at your number.."
print
waitkp
'
cls
gosub topscreen
'
print
print" Hanging up .. wait at least a minute or two for my callback ..."
print" then type ATA<return> on your terminal when you hear the ring!"
print" YOU MUST ANSWER WITHIN 45 SECONDS!!!!"
print
print" If DuCall doesn't susceed on its first attempt to connect with you,"
print" it will try ";str(tries-1); " more times. DuCall will make up to";
print" ";str(tries); " calls total."
print
dummy=" is attempting callback"
audittrail
'
CarrierCheck Off
z=0
do
Hangup
z=z+1
Delay 5
cls
Send "+++"+ chr(13)
Delay 5
Send "ATZ" + chr(13)
Delay 5
Send "ATDT" + phone + chr(13)
StartTime=Timer
ff=freefile
open "MODEM.DMP" for output as #ff
do
lockfile(ff,0,1)
print #ff, INCOMM;
unlockfile(ff,0,1)
if timer-starttime<0 then
if (86400-starttime)+timer>60 then
send chr(13):exit do
end if
end if
if timer-starttime>60 then
send chr(13)
exit do
end if
loop until carrier
close #ff
if z>=tries then
Dialing=1
dummy=" too many tries aborting "
audittrail
problem="User did not answer the phone after "+Str(z)+" tries."
SendSysopBadMsg
Dialing=0
if exists("MODEM.DMP") then KILL "MODEM.DMP"
carriercheck on
goto DucEnd
end if
Loop until Carrier
delay 1
do
loop until INCOMM=""
dummy=" connected with user "
audittrail
carriercheck on
'
x=0:y=0
'
do
CLS
print"connected on ";str(z); " attempt!"
print
center "This is "+bbsname+" calling to verify you.",15,0
print
pcolor=10
print chr(13);"@"+right(hex(pcolor),2)+"@";
name1 = inputmask(" Please enter your login name now: ","XXXXXXXXXXXXXXXXXXXXXXXXX")
name1=ucase(name1)
'
If user.name = name1 then
y=0
Do
print
password1=inputmask(" Please enter your password now: ","XXXXXXXXXXXXXX")
password1=ucase(password1)
y=y+1
if user.password = password1 then exit do
if y=3 then
print
print "You have had 3 incorrect password attempts. Try calling the BBS back"
print "and start the verification process again."
dummy=" user could not re-enter his password correctly! "
audittrail
problem="Called User/Bad Password Entered"
SendSysopBadMsg
goto DucEnd
end if
Loop
end if
'
if user.password = password1 then
gosub topscreen
color 14
print "Verified!"
print
if user.Seclevel <> "SYSOP" then user.Seclevel = aftersec
if ExpireDays>0 then
CurrentDate(ExpireDate)
IncDate ExpireDate, ExpireDays,0,0
user.expiredate=ExpireDate
dummy=" user expiration date set at: "+Formatdate(ExpireDate, dfmat)
AuditTrail
color 15,0
print
print "Your trial subscription to this system has been established!"
print
print "Your subscription expiration date has been set to: ";
color 12,0
print FormatDate(ExpireDate, dfmat)
color 11,0
print
print "At that time your user level will be down-graded back to non-verified"
print "and/or your user record will be deleted. Please check with the sysop"
print "and the bulletin menu for information on subscribing to this system."
print
waitkp
gosub topscreen
end if
user.datanumber = phonenum
if commentline>=1 and commentline<=5 then
user.comment(commentline)="pw: "+user.password
end if
if timebalance>0 then
user.subscriptionbalance=user.subscriptionbalance+timebalance
dummy=" subscription balance increased by "+str(timebalance)+" "
audittrail
color 15
print
print "Your time balance has been increased by ";timebalance;" minutes."
print "Withdraw that time and use it to look around the system."
print
print "Typically you can access the time bank from the main menu."
print
waitkp
gosub topscreen
end if
dummy=" successfully upgraded"
audittrail
pcolor=15
print chr(13);"@"+right(hex(pcolor),2)+"@";
print
print "Your security level has successfully been upgraded!"
if all_ld=1 then
color 11
print
Print "The call back verifier will now hang up. Wait a minute and then call"
print "us back. You will now have access to ";
color 12
print bbsname;:color 11:Print "."
print
print "Enjoy the system!"
SendWelcomeMessage
dummy=" User Verified! - hanging up "
audittrail
Carriercheck Off
Hangup
delay 30
goto DucEnd
end if
'
if ld=1 and dialld=1 then
print
print "You are long distance, therefore we are hanging up now. Wait a minute"
print "and call us back."
print
SendWelcomeMessage
dummy=" Long Distance Verified - hanging up "
audittrail
Carriercheck Off
Hangup
delay 30
goto DucEnd
end if
SendWelcomeMessage
print
Print" You have new mail ..."
print
if InputYesNo(" Read messages now? (YN) ") then
print
print "to read the messages you have waiting, please answer the"
print "following questions by TYPING a 'U' then an 'A'"
print
ReadMessages
end if
exit do
end if
'
x=x+1
if x=20 then
print"Too many wrong guesses. Call the board and start over."
dummy= " failed verification of name"
audittrail
problem="Called Back/Too many Guesses"
SendSysopBadMsg
hangup
goto DucEnd
end if
'
loop
DucEnd:
dummy =string(79,"─")
audittrail
gotomenu(mainmenu)
end
TopScreen:
cls
center "DuCall version "+ducallver,7,0
center string(50,"═"),15,0
Center "C A L L - B A C K V E R I F I C A T I O N",13,0
center string(50,"═"),15,0
center "Written by David Kuhn Copyright(c) 1995",7,0
print
pcolor=15
print chr(13);"@"+right(hex(pcolor),2)+"@";
print string(79, "═")
Return
CheckPhone:
if left(phonenum,3) = "911" then
print
print "We can't call 911, Ideot!"
delay 5
dummy=" user wanted us to call 911! "
audittrail
Problem="User tried to have us call 911!"
SendSysopBadMsg
goto DucEnd
end if
if left(right(rtrim(phonenum),8),3) = "911" then
print
print "We can't call 911, Ideot!"
delay 5
dummy=" user wanted us to call 911! "
audittrail
Problem="User tried to have us call 911!"
SendSysopBadMsg
goto DucEnd
end if
if left(phonenum,3) = "411" then
print
print "We can't call 411, Ideot!"
delay 5
dummy=" user wanted us to call 411! "
audittrail
Problem="User tried to have us call 411!"
SendSysopBadMsg
goto DucEnd
end if
if left(right(rtrim(phonenum),8),3) = "411" then
print
print "We can't call 411, Ideot!"
delay 5
dummy=" user wanted us to call 411! "
audittrail
Problem="User tried to have us call 411!"
SendSysopBadMsg
goto DucEnd
end if
if left(right(rtrim(phonenum),8),3) = "900" then
print
print "We can't call numbers, Ideot!"
delay 5
dummy=" user wanted us to call a 900 number! "
audittrail
problem="User tried to have us call a 900 number!"
SendSysopBadMsg
goto DucEnd
end if
if left(right(rtrim(phonenum),8),3) = "800" then
print
print "We can't call 800 numbers!"
delay 5
dummy=" user wanted us to call a 800 number! "
audittrail
problem="User tried to have us call a 800 number!"
SendSysopBadMsg
goto DucEnd
end if
if left(phonenum,3)="555" then
print
print "We can't call Hollywood, Silly!"
delay 5
dummy=" user wanted us to call Hollywood! "
audittrail
problem="User tried to have us call Holywood!"
SendSysopBadMsg
goto DucEnd
end if
if Left(right(rtrim(phonenum),8),3)="555" then
print
print "We can't call Hollywoood, Silly!"
delay 5
dummy=" user wanted us to call Hollywood! "
audittrail
problem="User tried to have us call Holywood!"
SendSysopBadMsg
goto DucEnd
end if
if right(rtrim(phonenum),8)="555-1212" then
print
print "We can't call information, Ideot!"
delay 5
dummy=" user wanted us to call information! "
audittrail
problem="User tried to have us call Information!"
SendSysopBadMsg
goto DucEnd
end if
return
end